<?php

class Back_Form_Ressources extends Jnd_Form
{

    public function __construct ($decorateur = "Formulairejndpro", $options = null)
    {
        parent::__construct($decorateur, $options);
        $this->setElementDecorators(
                array(
                        "$decorateur"
                ), array(), false);
    }

    public function init ()
    {
        $this->setAction('/back/ressources/editer');
        $this->setName("ressources");
        $this->setMethod("post");
        $this->addAttribs(
                array(
                        "class" => "cssform"
                ));
        
        $champ = new Zend_Form_Element_Hidden("id");
        $champs[] = $champ;
        
        $champ = new Zend_Form_Element_Text("nom");
        $champ->setLabel(__("Nom"));
        $champ->setRequired(true);
        $champs[] = $champ;
        
        $champ = new Zend_Form_Element_Select("module");
        $champ->setLabel(__("Module"));
        $champ->setMultiOptions(
                array(
                        "" => __('Faire un choix'),
                        "back" => __("Admin"),
                        "front" => __("Site")
                ));
        $champ->setRequired(true);
        $champs[] = $champ;
        
        $this->addElements($champs);
    }
}

